//控制页面大小函数

const properties = new Vue({
    el:"#properties",
    data(){
        return{
            main:main,
            thisObject:null,
            thisObjectUUid:null,
            main:main,
        }
    },
    methods:{
        fun_delete_byObject:function()
        {
           main.fun_component_remChildren();

        }

    },
    computed:{
        /**
         * 
         * @returns 当前选中的对象类型
         */
        computed_thisSelectObject:function(){
            let returnData = false;
            let mouse_selectComponentIdS =  this.main.mouse_selectComponentIdS;
            

            if (mouse_selectComponentIdS.length == 1  && mouse_selectComponentIdS[0] != undefined) 
            {
                let thisObject = this.main.requestData[this.main.requestData.modelType][mouse_selectComponentIdS[0]];
                this.thisObject = thisObject;
                this.thisObjectUUid = mouse_selectComponentIdS[0];
                controller_anime(true);
            }else if (mouse_selectComponentIdS.length >= 2 || mouse_selectComponentIdS.length == 0 ) 
            {
                // returnData  = "多个对象";
                controller_anime(false);
            }




            return true;
        }
    },
    watch:{
        "thisObject":function(newVal , oldVal)
        {
            console.log("----------------------------------------------------");
            console.log(newVal , oldVal);
        }
    },
    created()
    {
       
        
        

    }
});




var propertiesS = document.getElementById("properties");



//动画初始化
function controller_init(){
    //执行动画内容
    propertiesS.style.transform = "translateX(-290px)";
}



controller_init();




//动画执行
function controller_exit(){
    
    setTimeout(()=>{


        //执行动画内容
        controller_anime(true);



    },Math.round(Math.random()*600));


}

// setTimeout(controller_exit,000);



//判断当前动画是否完成完成后执行当前内容





function controller_anime(isOpen)
{

    // return;
    let animeData = {
        targets:propertiesS,
        duration:500,
        easing:"easeInOutQuart",
        // delay:1000,
        translateX: 0,
        
        update:function(){

        },
        begin:function(){

        }
    };

    if(isOpen)
    {
        animeData.translateX = 0;
         //执行动画内容
         anime(animeData);
    }else
    {
        animeData.translateX = -290;
        //执行动画内容
        anime(animeData);
    }
}


